<?=View::factory('admin/common/header')?>
<div id="content">
  <div class="breadcrumb">
    <a href="<?=URL::site('admin')?>">管理首页</a>
    &raquo; 系统设置
  </div>
  <?=View::factory('admin/common/message')?>
  <div class="box">
    <div class="heading">
      <h1><img src="<?=URL::site()?>images/admin/setting.png" alt="" /> 系统设置</h1>
      <div class="buttons">
        <input type="button" onclick="ajax_post();" class="btn45" value="保存" /> &nbsp;
        <input type="button" onclick="history.back();" class="btn45" value="返回" />
      </div>
    </div>
    <div class="content">
      <form method="post" enctype="multipart/form-data" id="form" onsubmit="return ajax_post();">
          <table class="form">
            <tr>
              <td width="150">网站名称 <span class="required">*</span></td>
              <td><input type="text" name="site_name" value="<?=$site->get('name')?>" size="40" /></td>
            </tr>
            <tr>
              <td>网站标题 <span class="required">*</span></td>
              <td><input type="text" name="site_title" value="<?=$site->get('title')?>" size="40" /></td>
            </tr>
            <tr>
              <td>网站地址 <span class="required">*</span></td>
              <td><input type="text" name="site_url" value="<?=$site->get('url')?>" size="40" /></td>
            </tr>
            <tr>
              <td>资源网址 <span class="required">*</span></td>
              <td><input type="text" name="site_resource" value="<?=$site->get('resource')?>" size="40" /></td>
            </tr>
            <tr>
              <td valign="top">SEO关键字</td>
              <td><textarea name="site_keywords" style="width:80%;overflow:auto;" rows="3"><?=$site->get('keywords')?></textarea></td>
            </tr>
            <tr>
              <td valign="top">SEO描述信息</td>
              <td><textarea name="site_description" style="width:80%;overflow:auto;" rows="3"><?=$site->get('description')?></textarea></td>
            </tr>
            <!--tr>
              <td valign="top">页面底部文字</td>
              <td><textarea name="site_footer" style="width:80%;overflow:auto;" rows="8"><?=htmlspecialchars($site->get('footer'))?></textarea><br /><font color=gray>支持 HTML 代码</font></td>
            </tr-->
          </table>
      </form>
    </div>
</div>
<?=View::factory('admin/common/footer')?>
<script type="text/javascript">
function ajax_post() {
    return $('#form').ajax_post();
}
$().ready(function(){
    $('#system').addClass('selected');
    $('input[name=site_hot_keywords]').keyup(function(){
        this.value = this.value.replace(/[\s,，]+/g, ' ');
    });
});
</script>